/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * JCLOUD IoT Edge API
 * API related to IoT Edge
 *
 * OpenAPI spec version: v2
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Iotedge.Apis;
using JDCloudSDK.Iotedge.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Iotedge.Client
{
    /// <summary>
    ///  JCLOUD IoT Edge API
    ///  API related to IoT Edge
    ///  Iotedge Api 客户端
    ///</summary>
    public class IotedgeClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private IotedgeClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public IotedgeClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public IotedgeClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public IotedgeClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.0
        ///</summary>
        public const string ClientVersion = "1.2.0";

        private const string apiVersion = "v2";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "console-be.iotedge.jdcloud.com";
        private const string serviceName = "iotedge";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  查看已发布应用列表接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppsResponse DescribeApps(DescribeAppsRequest request) {
            return  new DescribeAppsExecutor().Client(this).Execute<DescribeAppsResponse, DescribeAppsResult, DescribeAppsRequest>(request);
        }
#else
        /// <summary>
        ///  查看已发布应用列表接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppsResponse> DescribeApps(DescribeAppsRequest request) {
            return await new DescribeAppsExecutor().Client(this).Execute<DescribeAppsResponse, DescribeAppsResult, DescribeAppsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  根据设备服务名称+版本查询协议接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDSProtocolsWithCoreResponse DescribeDSProtocolsWithCore(DescribeDSProtocolsWithCoreRequest request) {
            return  new DescribeDSProtocolsWithCoreExecutor().Client(this).Execute<DescribeDSProtocolsWithCoreResponse, DescribeDSProtocolsWithCoreResult, DescribeDSProtocolsWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  根据设备服务名称+版本查询协议接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDSProtocolsWithCoreResponse> DescribeDSProtocolsWithCore(DescribeDSProtocolsWithCoreRequest request) {
            return await new DescribeDSProtocolsWithCoreExecutor().Client(this).Execute<DescribeDSProtocolsWithCoreResponse, DescribeDSProtocolsWithCoreResult, DescribeDSProtocolsWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  检测Edge开通状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CheckEdgeUserStatusResponse CheckEdgeUserStatus(CheckEdgeUserStatusRequest request) {
            return  new CheckEdgeUserStatusExecutor().Client(this).Execute<CheckEdgeUserStatusResponse, CheckEdgeUserStatusResult, CheckEdgeUserStatusRequest>(request);
        }
#else
        /// <summary>
        ///  检测Edge开通状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CheckEdgeUserStatusResponse> CheckEdgeUserStatus(CheckEdgeUserStatusRequest request) {
            return await new CheckEdgeUserStatusExecutor().Client(this).Execute<CheckEdgeUserStatusResponse, CheckEdgeUserStatusResult, CheckEdgeUserStatusRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  根据Edge名称查询相关配置信息接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeEdgeConfWithCoreResponse DescribeEdgeConfWithCore(DescribeEdgeConfWithCoreRequest request) {
            return  new DescribeEdgeConfWithCoreExecutor().Client(this).Execute<DescribeEdgeConfWithCoreResponse, DescribeEdgeConfWithCoreResult, DescribeEdgeConfWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  根据Edge名称查询相关配置信息接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeEdgeConfWithCoreResponse> DescribeEdgeConfWithCore(DescribeEdgeConfWithCoreRequest request) {
            return await new DescribeEdgeConfWithCoreExecutor().Client(this).Execute<DescribeEdgeConfWithCoreResponse, DescribeEdgeConfWithCoreResult, DescribeEdgeConfWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  消息路由详情查询
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeRouterDetailWithCoreResponse DescribeRouterDetailWithCore(DescribeRouterDetailWithCoreRequest request) {
            return  new DescribeRouterDetailWithCoreExecutor().Client(this).Execute<DescribeRouterDetailWithCoreResponse, DescribeRouterDetailWithCoreResult, DescribeRouterDetailWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  消息路由详情查询
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeRouterDetailWithCoreResponse> DescribeRouterDetailWithCore(DescribeRouterDetailWithCoreRequest request) {
            return await new DescribeRouterDetailWithCoreExecutor().Client(this).Execute<DescribeRouterDetailWithCoreResponse, DescribeRouterDetailWithCoreResult, DescribeRouterDetailWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  消息路由编辑
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateRouterWithCoreResponse UpdateRouterWithCore(UpdateRouterWithCoreRequest request) {
            return  new UpdateRouterWithCoreExecutor().Client(this).Execute<UpdateRouterWithCoreResponse, UpdateRouterWithCoreResult, UpdateRouterWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  消息路由编辑
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateRouterWithCoreResponse> UpdateRouterWithCore(UpdateRouterWithCoreRequest request) {
            return await new UpdateRouterWithCoreExecutor().Client(this).Execute<UpdateRouterWithCoreResponse, UpdateRouterWithCoreResult, UpdateRouterWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateSubDeviceConfigWithCoreResponse UpdateSubDeviceConfigWithCore(UpdateSubDeviceConfigWithCoreRequest request) {
            return  new UpdateSubDeviceConfigWithCoreExecutor().Client(this).Execute<UpdateSubDeviceConfigWithCoreResponse, UpdateSubDeviceConfigWithCoreResult, UpdateSubDeviceConfigWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  更新配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateSubDeviceConfigWithCoreResponse> UpdateSubDeviceConfigWithCore(UpdateSubDeviceConfigWithCoreRequest request) {
            return await new UpdateSubDeviceConfigWithCoreExecutor().Client(this).Execute<UpdateSubDeviceConfigWithCoreResponse, UpdateSubDeviceConfigWithCoreResult, UpdateSubDeviceConfigWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  给CloudMonitor使用的查询Edge详情信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeEdgeResponse DescribeEdge(DescribeEdgeRequest request) {
            return  new DescribeEdgeExecutor().Client(this).Execute<DescribeEdgeResponse, DescribeEdgeResult, DescribeEdgeRequest>(request);
        }
#else
        /// <summary>
        ///  给CloudMonitor使用的查询Edge详情信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeEdgeResponse> DescribeEdge(DescribeEdgeRequest request) {
            return await new DescribeEdgeExecutor().Client(this).Execute<DescribeEdgeResponse, DescribeEdgeResult, DescribeEdgeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  一个实例下的一个在线应用信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppDetailResponse DescribeAppDetail(DescribeAppDetailRequest request) {
            return  new DescribeAppDetailExecutor().Client(this).Execute<DescribeAppDetailResponse, DescribeAppDetailResult, DescribeAppDetailRequest>(request);
        }
#else
        /// <summary>
        ///  一个实例下的一个在线应用信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppDetailResponse> DescribeAppDetail(DescribeAppDetailRequest request) {
            return await new DescribeAppDetailExecutor().Client(this).Execute<DescribeAppDetailResponse, DescribeAppDetailResult, DescribeAppDetailRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  上线核心系统和安装包
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public OnlineResponse Online(OnlineRequest request) {
            return  new OnlineExecutor().Client(this).Execute<OnlineResponse, OnlineResult, OnlineRequest>(request);
        }
#else
        /// <summary>
        ///  上线核心系统和安装包
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<OnlineResponse> Online(OnlineRequest request) {
            return await new OnlineExecutor().Client(this).Execute<OnlineResponse, OnlineResult, OnlineRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  部署APP应用
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeployAppResponse DeployApp(DeployAppRequest request) {
            return  new DeployAppExecutor().Client(this).Execute<DeployAppResponse, DeployAppResult, DeployAppRequest>(request);
        }
#else
        /// <summary>
        ///  部署APP应用
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeployAppResponse> DeployApp(DeployAppRequest request) {
            return await new DeployAppExecutor().Client(this).Execute<DeployAppResponse, DeployAppResult, DeployAppRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  发布edge核心系统和安装包
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ReleaseResponse Release(ReleaseRequest request) {
            return  new ReleaseExecutor().Client(this).Execute<ReleaseResponse, ReleaseResult, ReleaseRequest>(request);
        }
#else
        /// <summary>
        ///  发布edge核心系统和安装包
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ReleaseResponse> Release(ReleaseRequest request) {
            return await new ReleaseExecutor().Client(this).Execute<ReleaseResponse, ReleaseResult, ReleaseRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询已发布核心系统和安装包的发布记录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public QueryResponse Query(QueryRequest request) {
            return  new QueryExecutor().Client(this).Execute<QueryResponse, QueryResult, QueryRequest>(request);
        }
#else
        /// <summary>
        ///  查询已发布核心系统和安装包的发布记录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<QueryResponse> Query(QueryRequest request) {
            return await new QueryExecutor().Client(this).Execute<QueryResponse, QueryResult, QueryRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  登记应用接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public RegisterAppResponse RegisterApp(RegisterAppRequest request) {
            return  new RegisterAppExecutor().Client(this).Execute<RegisterAppResponse, RegisterAppResult, RegisterAppRequest>(request);
        }
#else
        /// <summary>
        ///  登记应用接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<RegisterAppResponse> RegisterApp(RegisterAppRequest request) {
            return await new RegisterAppExecutor().Client(this).Execute<RegisterAppResponse, RegisterAppResult, RegisterAppRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询已经部署的App应用
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDeployAppResponse DescribeDeployApp(DescribeDeployAppRequest request) {
            return  new DescribeDeployAppExecutor().Client(this).Execute<DescribeDeployAppResponse, DescribeDeployAppResult, DescribeDeployAppRequest>(request);
        }
#else
        /// <summary>
        ///  查询已经部署的App应用
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDeployAppResponse> DescribeDeployApp(DescribeDeployAppRequest request) {
            return await new DescribeDeployAppExecutor().Client(this).Execute<DescribeDeployAppResponse, DescribeDeployAppResult, DescribeDeployAppRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询应用名称列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppNamesResponse DescribeAppNames(DescribeAppNamesRequest request) {
            return  new DescribeAppNamesExecutor().Client(this).Execute<DescribeAppNamesResponse, DescribeAppNamesResult, DescribeAppNamesRequest>(request);
        }
#else
        /// <summary>
        ///  查询应用名称列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppNamesResponse> DescribeAppNames(DescribeAppNamesRequest request) {
            return await new DescribeAppNamesExecutor().Client(this).Execute<DescribeAppNamesResponse, DescribeAppNamesResult, DescribeAppNamesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除Edge接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteEdgeWithCoreResponse DeleteEdgeWithCore(DeleteEdgeWithCoreRequest request) {
            return  new DeleteEdgeWithCoreExecutor().Client(this).Execute<DeleteEdgeWithCoreResponse, DeleteEdgeWithCoreResult, DeleteEdgeWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  删除Edge接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteEdgeWithCoreResponse> DeleteEdgeWithCore(DeleteEdgeWithCoreRequest request) {
            return await new DeleteEdgeWithCoreExecutor().Client(this).Execute<DeleteEdgeWithCoreResponse, DeleteEdgeWithCoreResult, DeleteEdgeWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  发布APP接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ReleaseAppResponse ReleaseApp(ReleaseAppRequest request) {
            return  new ReleaseAppExecutor().Client(this).Execute<ReleaseAppResponse, ReleaseAppResult, ReleaseAppRequest>(request);
        }
#else
        /// <summary>
        ///  发布APP接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ReleaseAppResponse> ReleaseApp(ReleaseAppRequest request) {
            return await new ReleaseAppExecutor().Client(this).Execute<ReleaseAppResponse, ReleaseAppResult, ReleaseAppRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询发布，上线，下线等操作记录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public OperateRecordResponse OperateRecord(OperateRecordRequest request) {
            return  new OperateRecordExecutor().Client(this).Execute<OperateRecordResponse, OperateRecordResult, OperateRecordRequest>(request);
        }
#else
        /// <summary>
        ///  查询发布，上线，下线等操作记录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<OperateRecordResponse> OperateRecord(OperateRecordRequest request) {
            return await new OperateRecordExecutor().Client(this).Execute<OperateRecordResponse, OperateRecordResult, OperateRecordRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  Edge核心系统安装
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public EdgeUpgradeWithCoreResponse EdgeUpgradeWithCore(EdgeUpgradeWithCoreRequest request) {
            return  new EdgeUpgradeWithCoreExecutor().Client(this).Execute<EdgeUpgradeWithCoreResponse, EdgeUpgradeWithCoreResult, EdgeUpgradeWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  Edge核心系统安装
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<EdgeUpgradeWithCoreResponse> EdgeUpgradeWithCore(EdgeUpgradeWithCoreRequest request) {
            return await new EdgeUpgradeWithCoreExecutor().Client(this).Execute<EdgeUpgradeWithCoreResponse, EdgeUpgradeWithCoreResult, EdgeUpgradeWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  卸载安装的APP
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UnInstallAppResponse UnInstallApp(UnInstallAppRequest request) {
            return  new UnInstallAppExecutor().Client(this).Execute<UnInstallAppResponse, UnInstallAppResult, UnInstallAppRequest>(request);
        }
#else
        /// <summary>
        ///  卸载安装的APP
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UnInstallAppResponse> UnInstallApp(UnInstallAppRequest request) {
            return await new UnInstallAppExecutor().Client(this).Execute<UnInstallAppResponse, UnInstallAppResult, UnInstallAppRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  给CloudMonitor使用的查询Edge列表信息
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeEdgesToCloudMonitorResponse DescribeEdgesToCloudMonitor(DescribeEdgesToCloudMonitorRequest request) {
            return  new DescribeEdgesToCloudMonitorExecutor().Client(this).Execute<DescribeEdgesToCloudMonitorResponse, DescribeEdgesToCloudMonitorResult, DescribeEdgesToCloudMonitorRequest>(request);
        }
#else
        /// <summary>
        ///  给CloudMonitor使用的查询Edge列表信息
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeEdgesToCloudMonitorResponse> DescribeEdgesToCloudMonitor(DescribeEdgesToCloudMonitorRequest request) {
            return await new DescribeEdgesToCloudMonitorExecutor().Client(this).Execute<DescribeEdgesToCloudMonitorResponse, DescribeEdgesToCloudMonitorResult, DescribeEdgesToCloudMonitorRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询Edge列表接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeEdgesWithCoreResponse DescribeEdgesWithCore(DescribeEdgesWithCoreRequest request) {
            return  new DescribeEdgesWithCoreExecutor().Client(this).Execute<DescribeEdgesWithCoreResponse, DescribeEdgesWithCoreResult, DescribeEdgesWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  查询Edge列表接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeEdgesWithCoreResponse> DescribeEdgesWithCore(DescribeEdgesWithCoreRequest request) {
            return await new DescribeEdgesWithCoreExecutor().Client(this).Execute<DescribeEdgesWithCoreResponse, DescribeEdgesWithCoreResult, DescribeEdgesWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  保存发布状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CompletedResponse Completed(CompletedRequest request) {
            return  new CompletedExecutor().Client(this).Execute<CompletedResponse, CompletedResult, CompletedRequest>(request);
        }
#else
        /// <summary>
        ///  保存发布状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CompletedResponse> Completed(CompletedRequest request) {
            return await new CompletedExecutor().Client(this).Execute<CompletedResponse, CompletedResult, CompletedRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  消息路由启停
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ControlRouterWithCoreResponse ControlRouterWithCore(ControlRouterWithCoreRequest request) {
            return  new ControlRouterWithCoreExecutor().Client(this).Execute<ControlRouterWithCoreResponse, ControlRouterWithCoreResult, ControlRouterWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  消息路由启停
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ControlRouterWithCoreResponse> ControlRouterWithCore(ControlRouterWithCoreRequest request) {
            return await new ControlRouterWithCoreExecutor().Client(this).Execute<ControlRouterWithCoreResponse, ControlRouterWithCoreResult, ControlRouterWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  新建消息路由
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddMsgRouterWithCoreResponse AddMsgRouterWithCore(AddMsgRouterWithCoreRequest request) {
            return  new AddMsgRouterWithCoreExecutor().Client(this).Execute<AddMsgRouterWithCoreResponse, AddMsgRouterWithCoreResult, AddMsgRouterWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  新建消息路由
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddMsgRouterWithCoreResponse> AddMsgRouterWithCore(AddMsgRouterWithCoreRequest request) {
            return await new AddMsgRouterWithCoreExecutor().Client(this).Execute<AddMsgRouterWithCoreResponse, AddMsgRouterWithCoreResult, AddMsgRouterWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  消息路由删除
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DelRouterWithCoreResponse DelRouterWithCore(DelRouterWithCoreRequest request) {
            return  new DelRouterWithCoreExecutor().Client(this).Execute<DelRouterWithCoreResponse, DelRouterWithCoreResult, DelRouterWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  消息路由删除
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DelRouterWithCoreResponse> DelRouterWithCore(DelRouterWithCoreRequest request) {
            return await new DelRouterWithCoreExecutor().Client(this).Execute<DelRouterWithCoreResponse, DelRouterWithCoreResult, DelRouterWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  应用历史版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppVersionsResponse DescribeAppVersions(DescribeAppVersionsRequest request) {
            return  new DescribeAppVersionsExecutor().Client(this).Execute<DescribeAppVersionsResponse, DescribeAppVersionsResult, DescribeAppVersionsRequest>(request);
        }
#else
        /// <summary>
        ///  应用历史版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppVersionsResponse> DescribeAppVersions(DescribeAppVersionsRequest request) {
            return await new DescribeAppVersionsExecutor().Client(this).Execute<DescribeAppVersionsResponse, DescribeAppVersionsResult, DescribeAppVersionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  消息路由列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeRoutersWithCoreResponse DescribeRoutersWithCore(DescribeRoutersWithCoreRequest request) {
            return  new DescribeRoutersWithCoreExecutor().Client(this).Execute<DescribeRoutersWithCoreResponse, DescribeRoutersWithCoreResult, DescribeRoutersWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  消息路由列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeRoutersWithCoreResponse> DescribeRoutersWithCore(DescribeRoutersWithCoreRequest request) {
            return await new DescribeRoutersWithCoreExecutor().Client(this).Execute<DescribeRoutersWithCoreResponse, DescribeRoutersWithCoreResult, DescribeRoutersWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  云翼发布结果回调接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AppCompletedResponse AppCompleted(AppCompletedRequest request) {
            return  new AppCompletedExecutor().Client(this).Execute<AppCompletedResponse, AppCompletedResult, AppCompletedRequest>(request);
        }
#else
        /// <summary>
        ///  云翼发布结果回调接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AppCompletedResponse> AppCompleted(AppCompletedRequest request) {
            return await new AppCompletedExecutor().Client(this).Execute<AppCompletedResponse, AppCompletedResult, AppCompletedRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询上线过的APP的历史上线数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeOnlineDetailsResponse DescribeOnlineDetails(DescribeOnlineDetailsRequest request) {
            return  new DescribeOnlineDetailsExecutor().Client(this).Execute<DescribeOnlineDetailsResponse, DescribeOnlineDetailsResult, DescribeOnlineDetailsRequest>(request);
        }
#else
        /// <summary>
        ///  查询上线过的APP的历史上线数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeOnlineDetailsResponse> DescribeOnlineDetails(DescribeOnlineDetailsRequest request) {
            return await new DescribeOnlineDetailsExecutor().Client(this).Execute<DescribeOnlineDetailsResponse, DescribeOnlineDetailsResult, DescribeOnlineDetailsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询配置信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubDeviceConfigWithCoreResponse DescribeSubDeviceConfigWithCore(DescribeSubDeviceConfigWithCoreRequest request) {
            return  new DescribeSubDeviceConfigWithCoreExecutor().Client(this).Execute<DescribeSubDeviceConfigWithCoreResponse, DescribeSubDeviceConfigWithCoreResult, DescribeSubDeviceConfigWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  查询配置信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubDeviceConfigWithCoreResponse> DescribeSubDeviceConfigWithCore(DescribeSubDeviceConfigWithCoreRequest request) {
            return await new DescribeSubDeviceConfigWithCoreExecutor().Client(this).Execute<DescribeSubDeviceConfigWithCoreResponse, DescribeSubDeviceConfigWithCoreResult, DescribeSubDeviceConfigWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  应用列表查询
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppListResponse DescribeAppList(DescribeAppListRequest request) {
            return  new DescribeAppListExecutor().Client(this).Execute<DescribeAppListResponse, DescribeAppListResult, DescribeAppListRequest>(request);
        }
#else
        /// <summary>
        ///  应用列表查询
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppListResponse> DescribeAppList(DescribeAppListRequest request) {
            return await new DescribeAppListExecutor().Client(this).Execute<DescribeAppListResponse, DescribeAppListResult, DescribeAppListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加Edge设备
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddEdgeWithCoreResponse AddEdgeWithCore(AddEdgeWithCoreRequest request) {
            return  new AddEdgeWithCoreExecutor().Client(this).Execute<AddEdgeWithCoreResponse, AddEdgeWithCoreResult, AddEdgeWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  添加Edge设备
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddEdgeWithCoreResponse> AddEdgeWithCore(AddEdgeWithCoreRequest request) {
            return await new AddEdgeWithCoreExecutor().Client(this).Execute<AddEdgeWithCoreResponse, AddEdgeWithCoreResult, AddEdgeWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除子设备
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DelSubDeviceWithCoreResponse DelSubDeviceWithCore(DelSubDeviceWithCoreRequest request) {
            return  new DelSubDeviceWithCoreExecutor().Client(this).Execute<DelSubDeviceWithCoreResponse, DelSubDeviceWithCoreResult, DelSubDeviceWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  删除子设备
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DelSubDeviceWithCoreResponse> DelSubDeviceWithCore(DelSubDeviceWithCoreRequest request) {
            return await new DelSubDeviceWithCoreExecutor().Client(this).Execute<DelSubDeviceWithCoreResponse, DelSubDeviceWithCoreResult, DelSubDeviceWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看操作记录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppOperationResponse DescribeAppOperation(DescribeAppOperationRequest request) {
            return  new DescribeAppOperationExecutor().Client(this).Execute<DescribeAppOperationResponse, DescribeAppOperationResult, DescribeAppOperationRequest>(request);
        }
#else
        /// <summary>
        ///  查看操作记录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppOperationResponse> DescribeAppOperation(DescribeAppOperationRequest request) {
            return await new DescribeAppOperationExecutor().Client(this).Execute<DescribeAppOperationResponse, DescribeAppOperationResult, DescribeAppOperationRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询Edge详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeEdgeDetailsWithCoreResponse DescribeEdgeDetailsWithCore(DescribeEdgeDetailsWithCoreRequest request) {
            return  new DescribeEdgeDetailsWithCoreExecutor().Client(this).Execute<DescribeEdgeDetailsWithCoreResponse, DescribeEdgeDetailsWithCoreResult, DescribeEdgeDetailsWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  查询Edge详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeEdgeDetailsWithCoreResponse> DescribeEdgeDetailsWithCore(DescribeEdgeDetailsWithCoreRequest request) {
            return await new DescribeEdgeDetailsWithCoreExecutor().Client(this).Execute<DescribeEdgeDetailsWithCoreResponse, DescribeEdgeDetailsWithCoreResult, DescribeEdgeDetailsWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询在线的核心系统或安装包
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeOnlineResponse DescribeOnline(DescribeOnlineRequest request) {
            return  new DescribeOnlineExecutor().Client(this).Execute<DescribeOnlineResponse, DescribeOnlineResult, DescribeOnlineRequest>(request);
        }
#else
        /// <summary>
        ///  查询在线的核心系统或安装包
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeOnlineResponse> DescribeOnline(DescribeOnlineRequest request) {
            return await new DescribeOnlineExecutor().Client(this).Execute<DescribeOnlineResponse, DescribeOnlineResult, DescribeOnlineRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询APP部署列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDeployDetailsResponse DescribeDeployDetails(DescribeDeployDetailsRequest request) {
            return  new DescribeDeployDetailsExecutor().Client(this).Execute<DescribeDeployDetailsResponse, DescribeDeployDetailsResult, DescribeDeployDetailsRequest>(request);
        }
#else
        /// <summary>
        ///  查询APP部署列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDeployDetailsResponse> DescribeDeployDetails(DescribeDeployDetailsRequest request) {
            return await new DescribeDeployDetailsExecutor().Client(this).Execute<DescribeDeployDetailsResponse, DescribeDeployDetailsResult, DescribeDeployDetailsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  APP启动/停止服务
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetAppStatusResponse SetAppStatus(SetAppStatusRequest request) {
            return  new SetAppStatusExecutor().Client(this).Execute<SetAppStatusResponse, SetAppStatusResult, SetAppStatusRequest>(request);
        }
#else
        /// <summary>
        ///  APP启动/停止服务
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetAppStatusResponse> SetAppStatus(SetAppStatusRequest request) {
            return await new SetAppStatusExecutor().Client(this).Execute<SetAppStatusResponse, SetAppStatusResult, SetAppStatusRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  一个实例下的一个在线应用信息，设备服务具有proplist
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSettingsResponse DescribeSettings(DescribeSettingsRequest request) {
            return  new DescribeSettingsExecutor().Client(this).Execute<DescribeSettingsResponse, DescribeSettingsResult, DescribeSettingsRequest>(request);
        }
#else
        /// <summary>
        ///  一个实例下的一个在线应用信息，设备服务具有proplist
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSettingsResponse> DescribeSettings(DescribeSettingsRequest request) {
            return await new DescribeSettingsExecutor().Client(this).Execute<DescribeSettingsResponse, DescribeSettingsResult, DescribeSettingsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询子设备列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubDevicesWithCoreResponse DescribeSubDevicesWithCore(DescribeSubDevicesWithCoreRequest request) {
            return  new DescribeSubDevicesWithCoreExecutor().Client(this).Execute<DescribeSubDevicesWithCoreResponse, DescribeSubDevicesWithCoreResult, DescribeSubDevicesWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  查询子设备列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubDevicesWithCoreResponse> DescribeSubDevicesWithCore(DescribeSubDevicesWithCoreRequest request) {
            return await new DescribeSubDevicesWithCoreExecutor().Client(this).Execute<DescribeSubDevicesWithCoreResponse, DescribeSubDevicesWithCoreResult, DescribeSubDevicesWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  部署内容查询
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeConfigResponse DescribeConfig(DescribeConfigRequest request) {
            return  new DescribeConfigExecutor().Client(this).Execute<DescribeConfigResponse, DescribeConfigResult, DescribeConfigRequest>(request);
        }
#else
        /// <summary>
        ///  部署内容查询
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeConfigResponse> DescribeConfig(DescribeConfigRequest request) {
            return await new DescribeConfigExecutor().Client(this).Execute<DescribeConfigResponse, DescribeConfigResult, DescribeConfigRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加子设备
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddSubDeviceWithCoreResponse AddSubDeviceWithCore(AddSubDeviceWithCoreRequest request) {
            return  new AddSubDeviceWithCoreExecutor().Client(this).Execute<AddSubDeviceWithCoreResponse, AddSubDeviceWithCoreResult, AddSubDeviceWithCoreRequest>(request);
        }
#else
        /// <summary>
        ///  添加子设备
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddSubDeviceWithCoreResponse> AddSubDeviceWithCore(AddSubDeviceWithCoreRequest request) {
            return await new AddSubDeviceWithCoreExecutor().Client(this).Execute<AddSubDeviceWithCoreResponse, AddSubDeviceWithCoreResult, AddSubDeviceWithCoreRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  APP应用维护接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public MaintainAppsResponse MaintainApps(MaintainAppsRequest request) {
            return  new MaintainAppsExecutor().Client(this).Execute<MaintainAppsResponse, MaintainAppsResult, MaintainAppsRequest>(request);
        }
#else
        /// <summary>
        ///  APP应用维护接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<MaintainAppsResponse> MaintainApps(MaintainAppsRequest request) {
            return await new MaintainAppsExecutor().Client(this).Execute<MaintainAppsResponse, MaintainAppsResult, MaintainAppsRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认IotedgeClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>iotedgeClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>iotedgeClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>iotedgeClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造IotedgeClient 对象
                ///</summary>
                IotedgeClient Build();
            }

            /// <summary>
            ///  默认IotedgeClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  IotedgeClient service client
                /// </summary>
                private  IotedgeClient iotedgeClient;

                /// <summary>
                ///  默认IotedgeClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    iotedgeClient = new IotedgeClient();
                }

                /// <summary>
                ///  构造IotedgeClient 对象
                ///</summary>
                public IotedgeClient Build()
                {
                    if (iotedgeClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        iotedgeClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (iotedgeClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("IotedgeClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (iotedgeClient.HttpRequestConfig == null)
                    {
                        iotedgeClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (iotedgeClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("IotedgeClient build error: http request config not set");
                        }
                    }
                    return iotedgeClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>iotedgeClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    iotedgeClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>iotedgeClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    iotedgeClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>iotedgeClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    iotedgeClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
